package com.qianniu.napi.admin.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.base.Strings;
import jdk.nashorn.internal.ir.annotations.Ignore;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author chenxuebin
 * @since 2018-12-17
 */
@TableName("t_pyq")
public class Pyq extends Model<Pyq> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 信息类型@1：图文结合；2：H5连接；3：视频
     */
	private Integer ptype;
	private String info;
	private String title;
	private BigDecimal money;
	private String pic;
	private String vedio;
	private String mname;
	private String mlogo;
	private String maddr;
	private String address;
	private String phone;
	@JsonIgnore
	private Long sid;
	@JsonIgnore
	private Long mid;
	@JsonIgnore
	private Long mpid;
	@JsonIgnore
	private Long uid;

	private Double lng;
	private Double lat;

	@TableField(exist = false)
	private Double distance;

	private Integer zan;

	@TableField(exist = false)
	private Integer self;

	@TableField(exist = false)
	private Integer expandall = -1;

	@TableField(exist = false)
	private Integer wozan;

	@TableField(exist = false)
	private Order order;

	@TableField(exist = false)
	private User jduser;

	private Integer huifu;
	private Integer views;
	private Integer zhuan;

	private Integer type;
	private String typename;
	private String shengcode;
	private String shicode;
	private String xiancode;

	private Integer status;
	private Integer state;

	@TableField(exist = false)
	private Integer ostatus;
	@TableField(exist = false)
	private String ostatusname;


	@JsonIgnore
	private Integer isdelete;
	private Date createtime;
	@JsonIgnore
	private Date modifytime;
	@JsonIgnore
	private Long modifier;

	@TableField(exist = false)
	private List<String> pics;

	@TableField(exist = false)
	private List<PyqAct> zans;

	@TableField(exist = false)
	private List<PyqAct> huifus;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getPtype() {
		return ptype;
	}

	public void setPtype(Integer ptype) {
		this.ptype = ptype;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public String getVedio() {
		return vedio;
	}

	public void setVedio(String vedio) {
		this.vedio = vedio;
	}

	public String getMname() {
		return mname;
	}

	public void setMname(String mname) {
		this.mname = mname;
	}

	public String getMlogo() {
		return mlogo;
	}

	public void setMlogo(String mlogo) {
		this.mlogo = mlogo;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Long getSid() {
		return sid;
	}

	public void setSid(Long sid) {
		this.sid = sid;
	}

	public Long getMid() {
		return mid;
	}

	public void setMid(Long mid) {
		this.mid = mid;
	}

	public Long getMpid() {
		return mpid;
	}

	public void setMpid(Long mpid) {
		this.mpid = mpid;
	}

	public Long getUid() {
		return uid;
	}

	public void setUid(Long uid) {
		this.uid = uid;
	}

	public Double getLng() {
		return lng;
	}

	public void setLng(Double lng) {
		this.lng = lng;
	}

	public Double getLat() {
		return lat;
	}

	public void setLat(Double lat) {
		this.lat = lat;
	}

	public Integer getZan() {
		return zan;
	}

	public void setZan(Integer zan) {
		this.zan = zan;
	}

	public Integer getHuifu() {
		return huifu;
	}

	public void setHuifu(Integer huifu) {
		this.huifu = huifu;
	}

	public Integer getViews() {
		return views;
	}

	public void setViews(Integer views) {
		this.views = views;
	}

	public Integer getZhuan() {
		return zhuan;
	}

	public void setZhuan(Integer zhuan) {
		this.zhuan = zhuan;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getModifytime() {
		return modifytime;
	}

	public void setModifytime(Date modifytime) {
		this.modifytime = modifytime;
	}

	public Long getModifier() {
		return modifier;
	}

	public void setModifier(Long modifier) {
		this.modifier = modifier;
	}

	public String getMaddr() {
		return maddr;
	}

	public void setMaddr(String maddr) {
		this.maddr = maddr;
	}

	public List<PyqAct> getZans() {
		return zans;
	}

	public void setZans(List<PyqAct> zans) {
		this.zans = zans;
	}

	public List<PyqAct> getHuifus() {
		return huifus;
	}

	public void setHuifus(List<PyqAct> huifus) {
		this.huifus = huifus;
	}

	public Integer getSelf() {
		return self;
	}

	public void setSelf(Integer self) {
		this.self = self;
	}

	public Integer getExpandall() {
		return expandall;
	}

	public void setExpandall(Integer expandall) {
		this.expandall = expandall;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getTypename() {
		return typename;
	}

	public void setTypename(String typename) {
		this.typename = typename;
	}

	public String getShengcode() {
		return shengcode;
	}

	public void setShengcode(String shengcode) {
		this.shengcode = shengcode;
	}

	public String getShicode() {
		return shicode;
	}

	public void setShicode(String shicode) {
		this.shicode = shicode;
	}

	public String getXiancode() {
		return xiancode;
	}

	public void setXiancode(String xiancode) {
		this.xiancode = xiancode;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Double getDistance() {
		return distance;
	}

	public void setDistance(Double distance) {
		this.distance = distance;
	}

	public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}

	public Integer getIsdelete() {
		return isdelete;
	}

	public void setIsdelete(Integer isdelete) {
		this.isdelete = isdelete;
	}

	public List<String> getPics() {
		if(!Strings.isNullOrEmpty(pic))return Arrays.asList(pic.split(";"));
		else return null;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Order getOrder() {
		return order;
	}

	public void setOrder(Order order) {
		this.order = order;
	}

	public User getJduser() {
		return jduser;
	}

	public void setJduser(User jduser) {
		this.jduser = jduser;
	}

	public Integer getOstatus() {
		return ostatus;
	}

	public void setOstatus(Integer ostatus) {
		this.ostatus = ostatus;
	}

	public String getOstatusname() {
		return ostatusname;
	}

	public void setOstatusname(String ostatusname) {
		this.ostatusname = ostatusname;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Pyq{" +
			"id=" + id +
			", ptype=" + ptype +
			", info=" + info +
			", pic=" + pic +
			", vedio=" + vedio +
			", mname=" + mname +
			", mlogo=" + mlogo +
			", phone=" + phone +
			", sid=" + sid +
			", mid=" + mid +
			", mpid=" + mpid +
			", uid=" + uid +
			", lng=" + lng +
			", lat=" + lat +
			", zan=" + zan +
			", huifu=" + huifu +
			", views=" + views +
			", zhuan=" + zhuan +
			", state=" + state +
			", createtime=" + createtime +
			", modifytime=" + modifytime +
			", modifier=" + modifier +
			"}";
	}

}
